<template>
  <div class="center-box">
    <!-- 面包屑-->
    <el-breadcrumb separator="/">
      <el-breadcrumb-item>企业门户管理系统</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/center' }"
        >个人中心</el-breadcrumb-item
      >
    </el-breadcrumb>
    <!--个人信息-->
    <div class="person-msg">
      <!-- 头像 -->
      <el-card shadow="never" class="avatar-card">
        <el-avatar :size="50" :src="state.circleUrl" />
        <div>
          <h3>{{ username }}</h3>
          <h3>管理员</h3>
        </div>
      </el-card>
      <!-- 详情 -->
      <div class="person-detail">
        <el-card shadow="always">
          <p>个人信息</p>
          <PersonDetail></PersonDetail>
        </el-card>
      </div>
    </div>
  </div>
</template>

<script setup>
import PersonDetail from "./PersonDetail";
import LocalCache from "@/utils/cache";
import { ref, reactive } from "vue";
const state = reactive({
  circleUrl:
    "https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png",
});
let { username } = LocalCache.getStorage("userInfo");
</script>

<style lang="scss" scoped>
.center-box {
  padding: 0 24px;
  padding-top: 12px;
}
//面包屑
::v-deep .el-breadcrumb {
  padding: 12px 0;
}
//个人信息
.person-msg {
  display: flex;
}
// 头像
.avatar-card {
  width: 200px;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-right: 12px;

  ::v-deep .el-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
}
// 详情

.person-detail {
  flex: 1;
  padding: 0;

  ::v-deep .el-card__body {
    padding: 0;
  }

  p {
    padding: 0 12px;
    height: 48px;
    line-height: 48px;
    border-bottom: 1px solid #ccc;
  }
}
</style>
